package chain;

import lombok.extern.slf4j.Slf4j;

/**
 * @Author: 582895699@qq.com
 * @Desctription: 责任链模式
 * @Date: Created in 2021/12/28 11:01
 */
@Slf4j
public class ConcreteHandler extends Handler {
    @Override
    public void handlerRequest(String request) {
        if ("one".equalsIgnoreCase(request)) {
            log.info("处理者1处理该请求");
        } else {
            if (getNext() != null) {
                getNext().handlerRequest(request);
            } else {
                log.info("无人处理的请求");
            }
        }
    }
}
